/*
 * @Author: [you name]
 * @Date: 2021-11-05 16:20:26
 * @LastEditors: [you name]
 * @LastEditTime: 2021-11-05 16:22:13
 * @Description: 
 */
import request from '@/utils/request'
export default {
    namespaced: true,
    state() {
        return {
            categories: []
        }
    },
    mutations: {
        SET_CATEGORIES(state, payload) {
            state.categories = payload
        }
    },
    actions: {
        async findAllEmployeeCategories( {commit} ) {
            let res = await request.get('/baseUser/pageQuery', {
                params: {
                    page: 1,
                    pageSize: 1000
                }
            })
            // 提交突变
            commit('SET_CATEGORIES', res.data.list)
        }
    }
}